package db

const TableNameActivityConditionReward = TablePrefix + "activity_condition_reward"

type ActivityConditionReward struct {
	BaseModel
	ActivityID uint  `gorm:"column:activity_id;type:int(11);default:0;comment:活动id" json:"activity_id" form:"activity_id"` // 活动id
	InviteID   uint  `gorm:"column:invite_id;type:int(11);default:0;comment:条件id" json:"invite_id" form:"invite_id"`       // 条件id
	TypeID     uint  `gorm:"column:type_id;type:int(11);default:0;comment:类型" json:"type_id" form:"type_id"`               // 类型
	Num        int64 `gorm:"column:num;type:int(11);default:0;comment:数量" json:"num" form:"num"`                           // 数量
	Energy     int64 `gorm:"column:energy;type:int(11);default:0;comment:能量数量" json:"energy" form:"energy"`                // 能量数量
}

func (*ActivityConditionReward) TableName() string {
	return TableNameActivityConditionReward
}

type ActivityConditionRewardHasOneType struct {
	ActivityConditionReward
	Types Type `gorm:"foreignKey:ID;references:TypeID" json:"types"`
}
